package com.example.demo.dao;

import com.example.demo.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
//import org.springframework.data.jpa.repository.Query;
//import org.springframework.stereotype.Repository;

@Repository
public interface LoginDao extends JpaRepository<User,String> {
    @Query(value="SELECT * from user where user_account=?1 AND password=?2",nativeQuery=true)
    User selectUser(String user_account,String password);
}
